﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace mfe_proj.Forms
{
    public partial class ReportBugForm : Form
    {
        string _ErrorText;
        public string ErrorText { get { return _ErrorText; } set { _ErrorText = value; } }

        public ReportBugForm()
        {
            InitializeComponent();
        }

        string GrabSystemInfo()
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("Platform: " + Environment.OSVersion.Platform);
            sb.AppendLine("Ver: " + Environment.OSVersion.VersionString);
            sb.AppendLine(".NET Runtime: " + Environment.Version.ToString());

            return sb.ToString();
        }

        private void ReportBugForm_Load(object sender, EventArgs e)
        {
            txtError.Text = DateTime.Now.ToString() + Environment.NewLine;
            txtError.Text += GrabSystemInfo() + Environment.NewLine;
            txtError.Text += _ErrorText;
        }
    }
}
